package com.ruoyi.fetv.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.fetv.mapper.FetvInformationMapper;
import com.ruoyi.fetv.domain.FetvInformation;
import com.ruoyi.fetv.service.IFetvInformationService;

/**
 * 资讯Service业务层处理
 * 
 * @author zhengmingjie
 * @date 2023-02-27
 */
@Service
public class FetvInformationServiceImpl implements IFetvInformationService 
{
    @Autowired
    private FetvInformationMapper fetvInformationMapper;

    /**
     * 查询资讯
     * 
     * @param informationId 资讯主键
     * @return 资讯
     */
    @Override
    public FetvInformation selectFetvInformationByInformationId(Integer informationId)
    {
        return fetvInformationMapper.selectFetvInformationByInformationId(informationId);
    }

    /**
     * 查询资讯列表
     * 
     * @param fetvInformation 资讯
     * @return 资讯
     */
    @Override
    public List<FetvInformation> selectFetvInformationList(FetvInformation fetvInformation)
    {
        return fetvInformationMapper.selectFetvInformationList(fetvInformation);
    }

    /**
     * 新增资讯
     * 
     * @param fetvInformation 资讯
     * @return 结果
     */
    @Override
    public int insertFetvInformation(FetvInformation fetvInformation)
    {
        fetvInformation.setCreateTime(DateUtils.getNowDate());
        return fetvInformationMapper.insertFetvInformation(fetvInformation);
    }

    /**
     * 修改资讯
     * 
     * @param fetvInformation 资讯
     * @return 结果
     */
    @Override
    public int updateFetvInformation(FetvInformation fetvInformation)
    {
        fetvInformation.setUpdateTime(DateUtils.getNowDate());
        return fetvInformationMapper.updateFetvInformation(fetvInformation);
    }

    /**
     * 批量删除资讯
     * 
     * @param informationIds 需要删除的资讯主键
     * @return 结果
     */
    @Override
    public int deleteFetvInformationByInformationIds(Integer[] informationIds)
    {
        return fetvInformationMapper.deleteFetvInformationByInformationIds(informationIds);
    }

    /**
     * 删除资讯信息
     * 
     * @param informationId 资讯主键
     * @return 结果
     */
    @Override
    public int deleteFetvInformationByInformationId(Integer informationId)
    {
        return fetvInformationMapper.deleteFetvInformationByInformationId(informationId);
    }

    /**
     * 查询审核表
     * @param fetvInformation
     * @return
     */
    @Override
    public List<FetvInformation> selectFetvInformationListVo(FetvInformation fetvInformation) {
        return fetvInformationMapper.selectFetvInformationListVo(fetvInformation);
    }
}
